package com.noassertions.validation.iscreen;

import org.iscreen.BaseValidator;
import org.iscreen.ValidatorContext;

/**
 * Validate that a string is from a configured list of
 * (comma-delimited) strings, optionally case-insensitive.
 * @author Scott McMaster
 *
 */
public class NotEmptyValidator extends BaseValidator {

	private String value; 

	public void validate(ValidatorContext context, Object beanToValidate) {
	
		if (value == null || "".equals(value)) {
			context.reportFailure(getDefaultFailure());
		}
	}

	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}


}